//
//  ComboCell.m
//  AnnCar_user
//
//  Created by LiBenCan on 17/10/26.
//  Copyright © 2017年 LiBenCan. All rights reserved.
//

#import "ComboCell.h"
#import "UILabel+HWDUILabel.h"
@implementation ComboCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.selectionStyle = 0;
        
    }
    return self;
}

- (void)loadCellDic:(NSDictionary *)dataDic
{
    if (!_nameLab) {
        
        //类型图片
        _imageV = [UIImageView new];
        [self.contentView addSubview:_imageV];
        [_imageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView).offset(15*screenW_6);
            make.left.equalTo(self.contentView).offset(15*screenW_6);
            make.width.height.equalTo(@(40*screenW_6));
        }];
        
        
        //种类名字
        _nameLab = [UILabel new];
        [self.contentView addSubview:_nameLab];
        _nameLab.font = [UIFont systemFontOfSize:17*screenW_6];
        _nameLab.textColor  = TextBlack;
        _nameLab.numberOfLines = 0;
        [_nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.imageV.mas_right).offset(10*screenW_6);
            make.width.equalTo(@(SCREENW/2));
            make.height.equalTo(@(40*screenW_6));
            make.top.equalTo(self.contentView).offset(15*screenW_6);
        }];
        
        //箭头 My_arrow
        _arrowImageV = [UIImageView new];
        [self.contentView addSubview:_arrowImageV];
        _arrowImageV.image = [UIImage imageNamed:@"My_arrow"];
        [_arrowImageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(@(-15*screenW_6));
            make.top.equalTo(self.contentView).offset(25*screenW_6);
            make.width.equalTo(@(8*screenW_6));
            make.height.equalTo(@(14*screenW_6));
        }];
        
        //金额
        _moneyLab = [UILabel new];
        [self.contentView addSubview:_moneyLab];
        _moneyLab.font = [UIFont systemFontOfSize:20*screenW_6];
        _moneyLab.textColor  = TextRed;
        _moneyLab.textAlignment = NSTextAlignmentRight;
        [_moneyLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.arrowImageV.mas_left).offset(-15*screenW_6);
            make.width.equalTo(@(100*screenW_6));
            make.height.equalTo(@(25*screenW_6));
            make.top.equalTo(self.contentView).offset(20*screenW_6);
        }];
        
        
        //描述discribLab
        _discribLab = [UILabel new];
        [self.contentView addSubview:_discribLab];
        _discribLab.font = [UIFont systemFontOfSize:12*screenW_6];
        _discribLab.textColor  = TextGray;
        _discribLab.numberOfLines = 0;
        [_discribLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.nameLab.mas_bottom).offset(5*screenW_6);
            make.left.equalTo(self.imageV.mas_right).offset(10*screenW_6);
            make.right.equalTo(@(-35*screenW_6));
            make.bottom.equalTo(self.contentView).offset(-15*screenW_6);
        }];
        
    }
    
    //数据jiazai
    _imageV.image = [UIImage imageNamed:@"orderNei"];
    _nameLab.text = @"精洗";
    _moneyLab.text = [NSString stringWithFormat:@"¥ 91"];
    [_moneyLab setTextFont:@"¥" font:[UIFont systemFontOfSize:12*screenW_6]];
    _discribLab.text = @"洪山区光谷大道未来之光停车场未来之光1305洪山区光谷大道未来之光停车场未来之光1305";
    [_discribLab setLineSpaceWithLineSpacing:5*screenW_6 text:_discribLab.text];
    
}

@end
